<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>订单查询</title>
	<meta name="decorator" content="default"/>
	<script src="${ctxStatic }/jquery/jquery-1.8.3.min.js"></script>
	<jsp:include page="/WEB-INF/views/modules/orders/head.jsp"></jsp:include>
	<script type="text/javascript" src="${ctxStatic }/gov/js/cityselect.js" ></script>
	<link href="${ctxStatic }/cityselector/cityselect.css" rel='stylesheet'type='text/css' />
	<script src="${ctxStatic}/jquery/jquery.validate.js" type="text/javascript"></script>
	<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1"></script>

<style type="text/css">
input, .uneditable-input {
		height:30px !important;
	    display: inline-block;
	    padding: 4px 6px;
	    margin-bottom: 10px;
	    font-size: 14px;
	    line-height: 20px;
	    color: #555555;
	    vertical-align: middle;
	    -webkit-border-radius: 4px;
	    -moz-border-radius: 4px;
	    border-radius: 4px;
	}
	.Wdate {
	    height:30px !important;
	    border: #999 1px solid;
	    background: #fff url(datePicker.gif) no-repeat right ;
	    background-color: rgb(255, 255, 255);
	}

</style>
<script type="text/javascript">
//百度地图API功能
function G(id) {
	return document.getElementById(id);
}
var map = new BMap.Map("l-map");
var ac = new BMap.Autocomplete(    //建立一个自动完成的对象
	{"input" : "suggestId"
	,"location" : map
});
ac.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
	var _value = e.fromitem.value;
	var value = "";
	if (e.fromitem.index > -1) {
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
	value = "";
	if (e.toitem.index > -1) {
		_value = e.toitem.value;
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
	G("searchResultPanel").innerHTML = str;
});
var myValue;
ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
var _value = e.item.value;
	myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	G("searchResultPanel").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
	setPlace();
	// 选中详细地址后，调用百度地图获取 云地理编码 
	var address = encodeURIComponent(myValue);
	$.getJSON(
			"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
			function(data){
			if(data.status == 0 && data.result.length>0 ){
				$('#departcityName').val(data.result[0].address_components.city);
				var $sitename = $('#departcityName').val();
				$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
					if(d!=null&&d!=''){
						$("#siteid").val(d);
					}else{
						$("#siteid").val("");
					}
				});
			}
		});
});
var ac2 = new BMap.Autocomplete(    //建立一个自动完成的对象
		{"input" : "suggestId2"
		,"location" : map
	});
	ac2.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
	var str = "";
		var _value = e.fromitem.value;
		var value = "";
		if (e.fromitem.index > -1) {
			value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
		}    
		str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
		value = "";
		if (e.toitem.index > -1) {
			_value = e.toitem.value;
			value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
		}    
		str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
		G("searchResultPanel2").innerHTML = str;
	});
	var myValue;
	ac2.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
	var _value = e.item.value;
		myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
		G("searchResultPanel2").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
		setPlace();
		// 选中详细地址后，调用百度地图获取 云地理编码 
		var address = encodeURIComponent(myValue);
		$.getJSON(
				"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
				function(data){
				if(data.status == 0 && data.result.length>0 ){
					$('#departcityName').val(data.result[0].address_components.city);
					var $sitename = $('#departcityName').val();
					$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
						if(d!=null&&d!=''){
							$("#siteid").val(d);
						}else{
							$("#siteid").val("");
						}
					});
				}
			});
	});
	//-1-
	var ac3 = new BMap.Autocomplete(    //建立一个自动完成的对象
	{"input" : "suggestId_2"
	,"location" : map
});
ac3.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
	var _value = e.fromitem.value;
	var value = "";
	if (e.fromitem.index > -1) {
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
	value = "";
	if (e.toitem.index > -1) {
		_value = e.toitem.value;
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
	G("searchResultPanel_2").innerHTML = str;
});
var myValue;
ac3.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
var _value = e.item.value;
	myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	G("searchResultPanel_2").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
	setPlace();
	// 选中详细地址后，调用百度地图获取 云地理编码 
	var address = encodeURIComponent(myValue);
	$.getJSON(
			"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
			function(data){
			if(data.status == 0 && data.result.length>0 ){
				$('#departcityName').val(data.result[0].address_components.city);
				var $sitename = $('#departcityName').val();
				$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
					if(d!=null&&d!=''){
						$("#siteid").val(d);
					}else{
						$("#siteid").val("");
					}
				});
			}
		});
});
	//
	//-2-
	var ac4 = new BMap.Autocomplete(    //建立一个自动完成的对象
	{"input" : "suggestId_3"
	,"location" : map
});
ac4.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
	var _value = e.fromitem.value;
	var value = "";
	if (e.fromitem.index > -1) {
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
	value = "";
	if (e.toitem.index > -1) {
		_value = e.toitem.value;
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
	G("searchResultPanel_3").innerHTML = str;
});
var myValue;
ac4.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
var _value = e.item.value;
	myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	G("searchResultPanel_3").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
	setPlace();
	// 选中详细地址后，调用百度地图获取 云地理编码 
	var address = encodeURIComponent(myValue);
	$.getJSON(
			"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
			function(data){
			if(data.status == 0 && data.result.length>0 ){
				$('#departcityName').val(data.result[0].address_components.city);
				var $sitename = $('#departcityName').val();
				$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
					if(d!=null&&d!=''){
						$("#siteid").val(d);
					}else{
						$("#siteid").val("");
					}
				});
			}
		});
});
	//
	//-3-
	var ac5 = new BMap.Autocomplete(    //建立一个自动完成的对象
	{"input" : "suggestId_4"
	,"location" : map
});
ac5.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
	var _value = e.fromitem.value;
	var value = "";
	if (e.fromitem.index > -1) {
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
	value = "";
	if (e.toitem.index > -1) {
		_value = e.toitem.value;
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
	G("searchResultPanel_4").innerHTML = str;
});
var myValue;
ac5.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
var _value = e.item.value;
	myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	G("searchResultPanel_4").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
	setPlace();
	// 选中详细地址后，调用百度地图获取 云地理编码 
	var address = encodeURIComponent(myValue);
	$.getJSON(
			"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
			function(data){
			if(data.status == 0 && data.result.length>0 ){
				$('#departcityName').val(data.result[0].address_components.city);
				var $sitename = $('#departcityName').val();
				$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
					if(d!=null&&d!=''){
						$("#siteid").val(d);
					}else{
						$("#siteid").val("");
					}
				});
			}
		});
});
	//
	//-4-
	var ac6 = new BMap.Autocomplete(    //建立一个自动完成的对象
	{"input" : "suggestId_5"
	,"location" : map
});
ac6.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
	var _value = e.fromitem.value;
	var value = "";
	if (e.fromitem.index > -1) {
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
	value = "";
	if (e.toitem.index > -1) {
		_value = e.toitem.value;
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
	G("searchResultPanel_5").innerHTML = str;
});
var myValue;
ac6.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
var _value = e.item.value;
	myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	G("searchResultPanel_5").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
	setPlace();
	// 选中详细地址后，调用百度地图获取 云地理编码 
	var address = encodeURIComponent(myValue);
	$.getJSON(
			"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
			function(data){
			if(data.status == 0 && data.result.length>0 ){
				$('#departcityName').val(data.result[0].address_components.city);
				var $sitename = $('#departcityName').val();
				$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
					if(d!=null&&d!=''){
						$("#siteid").val(d);
					}else{
						$("#siteid").val("");
					}
				});
			}
		});
});
	//
	//-5-
	var ac7 = new BMap.Autocomplete(    //建立一个自动完成的对象
	{"input" : "suggestId2_2"
	,"location" : map
});
ac7.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
	var _value = e.fromitem.value;
	var value = "";
	if (e.fromitem.index > -1) {
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
	value = "";
	if (e.toitem.index > -1) {
		_value = e.toitem.value;
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
	G("searchResultPanel2_2").innerHTML = str;
});
var myValue;
ac7.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
var _value = e.item.value;
	myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	G("searchResultPanel2_2").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
	setPlace();
	// 选中详细地址后，调用百度地图获取 云地理编码 
	var address = encodeURIComponent(myValue);
	$.getJSON(
			"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
			function(data){
			if(data.status == 0 && data.result.length>0 ){
				$('#departcityName').val(data.result[0].address_components.city);
				var $sitename = $('#departcityName').val();
				$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
					if(d!=null&&d!=''){
						$("#siteid").val(d);
					}else{
						$("#siteid").val("");
					}
				});
			}
		});
});
	//
	//-6-
	var ac8 = new BMap.Autocomplete(    //建立一个自动完成的对象
	{"input" : "suggestId2_3"
	,"location" : map
});
ac8.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
	var _value = e.fromitem.value;
	var value = "";
	if (e.fromitem.index > -1) {
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
	value = "";
	if (e.toitem.index > -1) {
		_value = e.toitem.value;
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
	G("searchResultPanel2_3").innerHTML = str;
});
var myValue;
ac8.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
var _value = e.item.value;
	myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	G("searchResultPanel2_3").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
	setPlace();
	// 选中详细地址后，调用百度地图获取 云地理编码 
	var address = encodeURIComponent(myValue);
	$.getJSON(
			"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
			function(data){
			if(data.status == 0 && data.result.length>0 ){
				$('#departcityName').val(data.result[0].address_components.city);
				var $sitename = $('#departcityName').val();
				$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
					if(d!=null&&d!=''){
						$("#siteid").val(d);
					}else{
						$("#siteid").val("");
					}
				});
			}
		});
});
	//
	//-7-
	var ac9 = new BMap.Autocomplete(    //建立一个自动完成的对象
	{"input" : "suggestId2_4"
	,"location" : map
});
ac9.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
	var _value = e.fromitem.value;
	var value = "";
	if (e.fromitem.index > -1) {
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
	value = "";
	if (e.toitem.index > -1) {
		_value = e.toitem.value;
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
	G("searchResultPanel2_4").innerHTML = str;
});
var myValue;
ac9.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
var _value = e.item.value;
	myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	G("searchResultPanel2_4").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
	setPlace();
	// 选中详细地址后，调用百度地图获取 云地理编码 
	var address = encodeURIComponent(myValue);
	$.getJSON(
			"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
			function(data){
			if(data.status == 0 && data.result.length>0 ){
				$('#departcityName').val(data.result[0].address_components.city);
				var $sitename = $('#departcityName').val();
				$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
					if(d!=null&&d!=''){
						$("#siteid").val(d);
					}else{
						$("#siteid").val("");
					}
				});
			}
		});
});
	//
	//-8-
	var ac10 = new BMap.Autocomplete(    //建立一个自动完成的对象
	{"input" : "suggestId2_5"
	,"location" : map
});
ac10.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
	var _value = e.fromitem.value;
	var value = "";
	if (e.fromitem.index > -1) {
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
	value = "";
	if (e.toitem.index > -1) {
		_value = e.toitem.value;
		value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	}    
	str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
	G("searchResultPanel2_5").innerHTML = str;
});
var myValue;
ac10.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
var _value = e.item.value;
	myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
	G("searchResultPanel2_5").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
	setPlace();
	// 选中详细地址后，调用百度地图获取 云地理编码 
	var address = encodeURIComponent(myValue);
	$.getJSON(
			"https://api.map.baidu.com/cloudgc/v1?ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1&address="+address+"&callback=?",
			function(data){
			if(data.status == 0 && data.result.length>0 ){
				$('#departcityName').val(data.result[0].address_components.city);
				var $sitename = $('#departcityName').val();
				$.post("${ctxFront}/sms/getSiteId","sitename="+$sitename,function(d){
					if(d!=null&&d!=''){
						$("#siteid").val(d);
					}else{
						$("#siteid").val("");
					}
				});
			}
		});
});
	//
function setPlace(){
	map.clearOverlays();    //清除地图上所有覆盖物
	function myFun(){
		var pp = local.getResults().getPoi(0).point;    //获取第一个智能搜索的结果
		map.centerAndZoom(pp, 18);
		map.addOverlay(new BMap.Marker(pp));    //添加标注
	}
	var local = new BMap.LocalSearch(map, { //智能搜索
	  onSearchComplete: myFun
	});
	local.search(myValue);
}
</script>
	<script type="text/javascript">
	$(function() {
		
		if("${message}".length>0){
			alert("${message}");
		}
		
		/*表单验证*/
		$('#fb').validate({
			rules : {
				departsitename : "required",
				destsitename : "required",
				daysnum: "required",
				before: "required",
				sum: "required",
				boardaddr: "required",
				deptime: "required",
				destaddr: "required",
				desttime: "required",
				end: "required",
				allprice: "required",
				minamount: "required",
				maxamount: "required",
				contacts: "required",
				payertel : {
					required : true,
					isMobile : true
				}
			},
			messages : {
				departsitename:"<i class='verico'></i>请选择出发城市",
				destsitename : "<i class='verico'></i>请选择目的地城市",
				daysnum: "<i class='verico'></i>请选择天数",
				before: "<i class='verico'></i>请选择出发时间",
				sum: "<i class='verico'></i>请输入每日班次",
				boardaddr: "<i class='verico'></i>请输入上车地点",
				deptime: "<i class='verico'></i>请选择出发时间",
				destaddr: "<i class='verico'></i>请输入下车地点",
				desttime: "<i class='verico'></i>请选择下车时间",
				end: "<i class='verico'></i>请输入截止日",
				allprice: "<i class='verico'></i>请输入总金额",
				minamount: "<i class='verico'></i>请输入成团人数",
				maxamount: "<i class='verico'></i>请输入最大参与人数",
				contacts: "<i class='verico'></i>请输入联系人",
				payertel : {
					required : "<i class='verico'></i>请输入手机号码",
					isMobile : "<i class='verico'></i>请输入正确手机号码"
				}
			}

		});
		/*手机验证*/
		jQuery.validator
				.addMethod(
						"isMobile",
						function(value, element) {
							var length = value.length;
							var mobile = /^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$/;
							return this.optional(element)
									|| (length == 11 && mobile
											.test(value));
						}, "请正确填写您的手机号码");
		
		// 初始化站点选择框
		$.post('${ctxFront}/info/site/siteJson', {
			spottypes : '0'
		}, function(data) {
			var allCity = data;//['北京市#001#1|beijing|bj','上海市#002#0|shanghai|sh'];
			new Vcity.CitySelector({
				input : 'departsite_sitename',
				cityData : allCity
			});
			new Vcity.CitySelector({
				input : 'destsite_sitename',
				cityData : allCity
			});
		});
		
		// 上车地点 -->
		$('#jia').click(function(){
				$('#area').after("<div class='control-group' id='area1'><label class='control-label'>上车地点2：</label>	<div class='controls'><input type='text'  name='boardaddr'  class='span4 required' id='suggestId_2' placeholder='请填写详细地址' value=''/><div id='searchResultPanel_2' style='border:1px solid #C0C0C0;width:150px;height:auto; display:none;'></div>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label> 出发时间2： </label><input type='text' placeholder='选择时间' class='Wdate  required' name='deptime' onclick=\"WdatePicker({dateFmt:'HH:mm',isShowClear:false});\" id='deptime' readonly='readonly'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jia.png' id='jia1'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jian.png' id='jian' /></div></div>");
				$('#jia').hide();
				$('#areanum').val(2);
		})
		
		$(document).on("click","#jia1",function(){
			$('#area1').after("<div class='control-group' id='area2'><label class='control-label'>上车地点3：</label>	<div class='controls'><input type='text'  name='boardaddr'  class='span4 required' id='suggestId_3' placeholder='请填写详细地址' value=''/><div id='searchResultPanel_3' style='border:1px solid #C0C0C0;width:150px;height:auto; display:none;'></div>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label> 出发时间3： </label><input type='text' placeholder='选择时间' class='Wdate  required' name='deptime' onclick=\"WdatePicker({dateFmt:'HH:mm',isShowClear:false});\" id='deptime' readonly='readonly'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jia.png' id='jia2'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jian.png' id='jian1' /></div></div>");
			$('#jia1').hide();
			$('#jian').hide();
			$('#areanum').val(3);
	    });
		
		$(document).on("click","#jia2",function(){
			$('#area2').after("<div class='control-group' id='area3'><label class='control-label'>上车地点4：</label>	<div class='controls'><input type='text'  name='boardaddr'  class='span4 required' id='suggestId_4' placeholder='请填写详细地址' value=''/><div id='searchResultPanel_4' style='border:1px solid #C0C0C0;width:150px;height:auto; display:none;'></div>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label> 出发时间4： </label><input type='text' placeholder='选择时间' class='Wdate  required' name='deptime' onclick=\"WdatePicker({dateFmt:'HH:mm',isShowClear:false});\" id='deptime' readonly='readonly'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jia.png' id='jia3'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jian.png' id='jian2' /></div></div>");
			$('#jia2').hide();
			$('#jian1').hide();
			$('#areanum').val(4);
	    });
		$(document).on("click","#jia3",function(){
			$('#area3').after("<div class='control-group' id='area4'><label class='control-label'>上车地点5：</label>	<div class='controls'><input type='text'  name='boardaddr'  class='span4 required' id='suggestId_5' placeholder='请填写详细地址' value=''/><div id='searchResultPanel_5' style='border:1px solid #C0C0C0;width:150px;height:auto; display:none;'></div>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label> 出发时间5： </label><input type='text' placeholder='选择时间' class='Wdate  required' name='deptime' onclick=\"WdatePicker({dateFmt:'HH:mm',isShowClear:false});\" id='deptime' readonly='readonly'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jian.png' id='jian3' /></div></div>");
			$('#jia3').hide();
			$('#jian2').hide();
			$('#areanum').val(5);
	    });
		$(document).on("click","#jian3",function(){
			$('#area4').remove();
			$('#jia3').show();
			$('#jian2').show();
			$('#areanum').val(4);
	    });
		$(document).on("click","#jian2",function(){
			$('#area3').remove();
			$('#jia2').show();
			$('#jian1').show();
			$('#areanum').val(3);
	    });
		$(document).on("click","#jian1",function(){
			$('#area2').remove();
			$('#jia1').show();
			$('#jian').show();
			$('#areanum').val(2);
	    });
		$(document).on("click","#jian",function(){
			$('#area1').remove();
			$('#jia').show();
			$('#areanum').val(1);
	    });
		
		// 下车地点
		$('#xjia').click(function(){
			$('#place').after("<div class='control-group' id='place1'><label class='control-label'>下车地点2：</label><div class='controls'><input type='text'  name='destaddr'  class='span4 required' id='suggestId2_2' placeholder='请填写详细地址' value=''/><div id='searchResultPanel2_2' style='border:1px solid #C0C0C0;width:150px;height:auto; display:none;'></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label > 下车时间2： </label><input type='text' placeholder='选择时间' class='Wdate  required' name='desttime' onclick=\"WdatePicker({dateFmt:'HH:mm',isShowClear:false});\" id='desttime' readonly='readonly'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jia.png' id='xjia1'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jian.png' id='xjian'/></div></div>");
			$('#xjia').hide();
			$('#placenum').val(2);
		})
		$(document).on("click","#xjia1",function(){
			$('#place1').after("<div class='control-group' id='place2'><label class='control-label'>下车地点3：</label><div class='controls'><input type='text'  name='destaddr'  class='span4 required' id='suggestId2_3' placeholder='请填写详细地址' value=''/><div id='searchResultPanel2_3' style='border:1px solid #C0C0C0;width:150px;height:auto; display:none;'></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label > 下车时间3： </label><input type='text' placeholder='选择时间' class='Wdate  required' name='desttime' onclick=\"WdatePicker({dateFmt:'HH:mm',isShowClear:false});\" id='desttime' readonly='readonly'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jia.png' id='xjia2'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jian.png' id='xjian1'/></div></div>");
			$('#xjia1').hide();
			$('#xjian').hide();
			$('#placenum').val(3);
		})
		$(document).on("click","#xjia2",function(){
			$('#place2').after("<div class='control-group' id='place3'><label class='control-label'>下车地点4：</label><div class='controls'><input type='text'  name='destaddr'  class='span4 required' id='suggestId2_4' placeholder='请填写详细地址' value=''/><div id='searchResultPanel2_4' style='border:1px solid #C0C0C0;width:150px;height:auto; display:none;'></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label > 下车时间4： </label><input type='text' placeholder='选择时间' class='Wdate  required' name='desttime' onclick=\"WdatePicker({dateFmt:'HH:mm',isShowClear:false});\" id='desttime' readonly='readonly'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jia.png' id='xjia3'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jian.png' id='xjian2'/></div></div>");
			$('#xjia2').hide();
			$('#xjian1').hide();
			$('#placenum').val(4);
		})
		$(document).on("click","#xjia3",function(){
			$('#place3').after("<div class='control-group' id='place4'><label class='control-label'>下车地点5：</label><div class='controls'><input type='text'  name='destaddr'  class='span4 required' id='suggestId2_5' placeholder='请填写详细地址' value=''/><div id='searchResultPanel2_5' style='border:1px solid #C0C0C0;width:150px;height:auto; display:none;'></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label > 下车时间5： </label><input type='text' placeholder='选择时间' class='Wdate  required' name='desttime' onclick=\"WdatePicker({dateFmt:'HH:mm',isShowClear:false});\" id='desttime' readonly='readonly'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='${ctxStatic }/index/images/jian.png' id='xjian3'/></div></div>");
			$('#xjia3').hide();
			$('#xjian2').hide();
			$('#placenum').val(5);
		})
		
		$(document).on("click","#xjian3",function(){
			$('#place4').remove();
			$('#xjia3').show();
			$('#xjian2').show();
			$('#placenum').val(4);
	    });
		$(document).on("click","#xjian2",function(){
			$('#place3').remove();
			$('#xjia2').show();
			$('#xjian1').show();
			$('#placenum').val(3);
	    });
		$(document).on("click","#xjian1",function(){
			$('#place2').remove();
			$('#xjia1').show();
			$('#xjian').show();
			$('#placenum').val(2);
	    });
		$(document).on("click","#xjian",function(){
			$('#place1').remove();
			$('#xjia').show();
			$('#placenum').val(1);
	    });
		
		
		
	})
</script>
</head>
<body>
<ul class="nav nav-tabs">
		<li ><a href="${ctx}/orders/shareProduct/allShareList">有效拼车</a></li>
		<li ><a href="${ctx}/orders/shareProduct/expireShareList">未成功拼车</a></li>
		<li class="active"><a href="javascript:void(0)">添加</a></li>
	</ul>
	<div class="form-horizontal">
	<div class="control-group">
	<label class="control-label">选择发布类型：</label>
		<div class="controls">
			<form  action="${ctx}/orders/shareProduct/addShareProduct" style="display:inline;">
				<input type="hidden" name="type" value="0"/>
				<input type="submit"  value="切换至旅游拼车发布" id="btnSubmit" class="btn btn-primary"/>
			</form>
			<form  action="${ctx}/orders/shareProduct/addShareProduct" style="display:inline;">
				<input type="hidden" name="type" value="1"/>
				<input type="submit"  value="切换至接送机拼车发布" id="btnSubmit" class="btn btn-primary"/>
			</form>
		</div>
	</div>      
	</div>
	
	<form action="${ctx}/orders/shareProduct/cjCar" class="form-horizontal" method="post" id="fb">
		<input type="hidden" name="areanum" value="1" id="areanum">
		<input type="hidden" name="placenum" value="1" id="placenum">
		<div class="control-group" >
			<label class="control-label">出发城市：</label>
			<div class="controls">
				<input type="text" id="departsite_sitename" data-autocity="yes" name="departsitename"
	        		 class="apt-city required span4" placeholder="选择城市" autocomplete="off" value="">
				<input type="hidden" name="departsite"  id="departcity.siteid" value="">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">目的地：</label>
			<div class="controls">
				<input type="text" id="destsite_sitename" data-autocity="off" name="destsitename"
	        		 class="apt-city required span4" placeholder="选择城市" autocomplete="off" value="">
				<input type="hidden" name="destsite"  id="destcity.siteid" value="">
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">天数：</label>
			<div class="controls">
				<input type="number" min="1"  name="daysnum"  class=" required" style="width: 50px;"/>
			</div>
		</div> 
	
		<div class="control-group">
			<label class="control-label">出发日期：</label>
			<div class="controls">
				<input type="text" placeholder="选择日期" class="Wdate  required" name="before" 
	  	   	  onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});" id="before" readonly="readonly"/>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">每日班次：</label>
			<div class="controls">
				<input type="number" min="1"  name="sum"  class="required" style="width: 50px;"/>
			</div>
		</div> 
		
		<div class="control-group" id="area">
			<label class="control-label">上车地点：</label>
			<div class="controls">
				<input type="text"  name="boardaddr"  class="span4 required" id="suggestId" placeholder="请填写详细地址" value=""/>
				<div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;"></div>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label> 出发时间： </label>
				<input type="text" placeholder="选择时间" class="Wdate  required" name="deptime" 
	  	   	  onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});" id="deptime" readonly="readonly"/>
	  	   	  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="${ctxStatic }/index/images/jia.png" id="jia" />
			</div>
		</div>
		
		
		<div class="control-group" id="place">
			<label class="control-label">下车地点：</label>
			<div class="controls">
				<input type="text"  name="destaddr"  class="span4 required" id="suggestId2" placeholder="请填写详细地址" value=""/>
				<div id="searchResultPanel2" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;"></div>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label > 下车时间： </label>
				<input type="text" placeholder="选择时间" class="Wdate  required" name="desttime" 
	  	   	  onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});" id="desttime" readonly="readonly"/>
	  	   	  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="${ctxStatic }/index/images/jia.png" id="xjia"/>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">拼车金额：</label>
			<div class="controls">
				<input type="number" min="0"  name="allprice"  class="span4 required" />
			</div>
		</div> 
		
		<div class="control-group">
			<label class="control-label">成团人数：</label>
			<div class="controls">
				<input type="number" min="1" name="minamount"  id="minamount" class="span4 required" />
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">最多报名人数：</label>
			<div class="controls">
				<input type="number" min="0" name="maxamount"  class="span4 required" />
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">截止日期： </label>
			<div class="controls">
				出发日期前 <input type="number"   name="end" id="end" min="1" class="required" style="width: 50px;"/> 天
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">联系人：</label>
			<div class="controls">
				<input type="text"   name="contacts" id="contacts" class="span4 required" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">联系电话：</label>
			<div class="controls">
				<input type="text"  name="phone" id="phone" class="span4 required">
			</div>
		</div>
		<div class="form-actions">
			<input id="btnSubmit" class="btn btn-primary" type="submit"
					value="发 布" />&nbsp;
			<input id="btnCancel" class="btn" type="button" value="返 回"
				onclick="history.go(-1)" />
		</div>
	</form>
</body>
</html>
